home *** CD-ROM | disk | FTP | other *** search
- Path: prairienet.org!sjmccaug
- From: sjmccaug@prairienet.org (Scott J. McCaughrin)
- Newsgroups: comp.lang.c++
- Subject: Re: memory model question
- Date: 20 Jan 1996 22:17:40 GMT
- Organization: University of Illinois at Urbana
- Message-ID: <4drpm4$f6s@vixen.cso.uiuc.edu>
- References: <4d94go$sp0@cantaloupe.srv.cs.cmu.edu>
- Reply-To: sjmccaug@prairienet.org (Scott J. McCaughrin)
- NNTP-Posting-Host: firefly.prairienet.org
-
-
- In a previous article, bmm+@BMM.PC.CS.CMU.EDU (Bruce Maggs) says:
-
- >
- >Hi,
- >
- >I'm compiling a C program using Borland's C++ for DOS. It's a large
- >program, but doesn't use much static memory. I've selected the
- >"small" memory model. The program compiles and runs without any
- >problems, but the length of the .exe file that the compiler produces
- >is 148K. I thought that in the small memory model the length of the
- >code would be limited to one segment, i.e., 64K. I'm curious about
- >what's going on here. Does the compiler automatically split my code
- >into two or more segments?
- >
- The small model actually supports 2 segments -- one for code, the other
- for everything else. Then, there is extra stuff for relocation to make
- a .exe file. It is the tiny model that confines code and data to one
- segment.
-
- Scott
-
-